import 'package:hi_net/http/core/hi_net.dart';
import 'package:hi_net/http/request/ranking_request.dart';
import 'package:hi_net/model/ranking_mo.dart';

///排行榜
class RankingDao {
  //https://api.devio.org/uapi/fa/ranking?sort=like&pageIndex=1&pageSize=40
  static get(String sort, {int pageIndex = 1, pageSize = 10}) async {
    RankingRequest request = RankingRequest();
    request.add("sort", sort).add("pageIndex", pageIndex).add("pageSize", pageSize);
    var result = await HiNet.getInstance.fire(request);
    return RankingMo.fromJson(result['data']);
  }
}
